# -*- coding: utf-8 -*-
"""
@Time ： 2024/3/5 14:37
@Auth ： gc
"""
import akshare as ak
import time
import datetime
stock_list = ["600039","600132","600598","600009"]
etf_list = ["512530"]
while True:
    try:
        for symbol in stock_list:
            stock_individual_info_em_df = ak.stock_individual_info_em(symbol = symbol)
            stock_bid_ask_em_df = ak.stock_bid_ask_em(symbol=symbol)
            print(f'stock_individual_info_em_df.iloc[5]["value"]: {stock_bid_ask_em_df.iloc[10]["value"]}')
        for etf in etf_list:
            stock_bid_ask_em_df = ak.fund_etf_hist_min_em(etf, period="5",start_date=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
            print(f'{etf}: {stock_bid_ask_em_df.iloc[-1]["收盘"]}')
    except Exception as e:
        pass
    print(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
    time.sleep(60)